<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 1 + 100
    // var num = 1
    // var sum = 0

    // while(num <= 100) {
    //   sum += num
    //   num++
    // }
    // console.log(sum)

    var str = prompt('吃了吗')

    while(str !== '吃了') {
      str = prompt('吃了吗')
    }

    alert('那挺好')
  </script>
</body>
</html>